package com.example.coco.res;


import com.example.coco.model.Admin;
import com.example.coco.model.Cusumer;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminMapper {
    @Select("select userpassword from admin where userid = #{userid}")
    String adminlog(String userid);
    @Delete("delete from admin where userid = #{userid}")
    void deleteAdminuser(String id);
    @Insert("insert into admin(userid,userpassword) values (#{userid},#{userpassword})")
    void insertAdminuser(Admin admin);
    @Select("select * from admin")
    List<Admin> findAll();
}
